﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Pub;
using System.Threading;
using LZQXT.Test.Forms.DB;
using LZQXT.Test.Forms;
using LZQXT.Test.Forms.Tree;

namespace LZQXT.Test
{

    public class CJT_DBTree
    {

        //public static FDBInit fdbinit;
        //public static FDBInit_Add fdbinit_add;
        public static FDBTree fdb_tree;       //main

        ADOTest ado1 = new ADOTest();
        //CPub.webPath = ado1.sel1("select * from G_Pub_Mcb where use_note='WebPath'").Tables[0].Rows[0]["Val_Str"].ToString();
        /*
        CPub.exePath = Application.StartupPath;
        CPub.B_Test = Boolean.Parse(CConfig.getPermite("Test"));
         * */
    }

    public static class JTBOX
    {
        /// <summary>
        /// 注册插件
        /// </summary>
        /// <param name="node1"></param>
        /// <param name="list1"></param>
        /// <returns></returns>
        public static bool RegPlug(List<Form> list1, ImageList imgLst)
        {
            try
            {
                //CJT_DBTree.fdbinit = new FDBInit();
                //CJT_DBTree.fdbinit_add = new FDBInit_Add();
                CJT_DBTree.fdb_tree = new FDBTree();


                FDBTree f1 = CJT_DBTree.fdb_tree;
                list1.Add(f1);

                imgLst.Images[list1.Count - 1] = f1.imageList2.Images[0];
            }
            catch (System.Exception ex)
            {
                CDebug.SendError(ex.ToString());
                return false;
            }
            return true;
        }
    }

}
